import React, { useEffect, useState } from 'react'
import { getUser, addUser } from '../../../request/instance'
import { useNavigate, useLocation } from 'react-router-dom'
import { NavBar } from 'antd-mobile'
import '../css/personal.scss'
// 个人信息

export default function Personal(props) {
  const navigate = useNavigate()
  const { state } = useLocation()

  const back = () => {
    navigate(-1)
  }


  return (
    <div className="personalView">
      <NavBar onBack={back}>个人信息</NavBar>
      <div className="xinxi">
        <span>头像</span>
        <div className="img">
          <img src={state.picture} alt="" />
        </div>
      </div>

      <div className="xinxi">
        <span>昵称</span>
        <span>{state.petname}</span>
      </div>
      <div className="xinxi">
        <span>性别: {state.gender == 1 ? '男' : '女'}</span>
      </div>
    </div>
  )
}
